3.275 \(\int (c+d x) \csc ^2(a+b x) \sec ^2(a+b x) \, dx\)

Optimal. Leaf size=35 \[ \frac{d \log (\sin (2 a+2 b x))}{b^2}-\frac{2 (c+d x) \cot (2 a+2 b x)}{b} \]

[Out]

(-2*(c + d*x)*Cot[2*a + 2*b*x])/b + (d*Log[Sin[2*a + 2*b*x]])/b^2

________________________________________________________________________________________

Rubi [A]  time = 0.0594156, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136, Rules used = {4419, 4184, 3475} \[ \frac{d \log (\sin (2 a+2 b x))}{b^2}-\frac{2 (c+d x) \cot (2 a+2 b x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*Csc[a + b*x]^2*Sec[a + b*x]^2,x]

[Out]

(-2*(c + d*x)*Cot[2*a + 2*b*x])/b + (d*Log[Sin[2*a + 2*b*x]])/b^2

Rule 4419

Int[Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b_.)*(x_)]^(n_.), x_Symbol] :> Dist[
2^n, Int[(c + d*x)^m*Csc[2*a + 2*b*x]^n, x], x] /; FreeQ[{a, b, c, d, m}, x] && IntegerQ[n] && RationalQ[m]

Rule 4184

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp[((c + d*x)^m*Cot[e + f*x])/f, x]
+ Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (c+d x) \csc ^2(a+b x) \sec ^2(a+b x) \, dx &=4 \int (c+d x) \csc ^2(2 a+2 b x) \, dx\\ &=-\frac{2 (c+d x) \cot (2 a+2 b x)}{b}+\frac{(2 d) \int \cot (2 a+2 b x) \, dx}{b}\\ &=-\frac{2 (c+d x) \cot (2 a+2 b x)}{b}+\frac{d \log (\sin (2 a+2 b x))}{b^2}\\ \end{align*}

Mathematica [A]  time = 0.203898, size = 32, normalized size = 0.91 \[ \frac{d \log (\sin (2 (a+b x)))-2 b (c+d x) \cot (2 (a+b x))}{b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*Csc[a + b*x]^2*Sec[a + b*x]^2,x]

[Out]

(-2*b*(c + d*x)*Cot[2*(a + b*x)] + d*Log[Sin[2*(a + b*x)]])/b^2

________________________________________________________________________________________

Maple [B]  time = 0.074, size = 182, normalized size = 5.2 \begin{align*}{ \left ({\frac{c}{2\,b}}-3\,{\frac{c \left ( \tan \left ( 1/2\,bx+a/2 \right ) \right ) ^{2}}{b}}+{\frac{c}{2\,b} \left ( \tan \left ({\frac{bx}{2}}+{\frac{a}{2}} \right ) \right ) ^{4}}+{\frac{dx}{2\,b}}-3\,{\frac{dx \left ( \tan \left ( 1/2\,bx+a/2 \right ) \right ) ^{2}}{b}}+{\frac{dx}{2\,b} \left ( \tan \left ({\frac{bx}{2}}+{\frac{a}{2}} \right ) \right ) ^{4}} \right ) \left ( \tan \left ({\frac{bx}{2}}+{\frac{a}{2}} \right ) \right ) ^{-1} \left ( \left ( \tan \left ({\frac{bx}{2}}+{\frac{a}{2}} \right ) \right ) ^{2}-1 \right ) ^{-1}}+{\frac{d}{{b}^{2}}\ln \left ( \tan \left ({\frac{bx}{2}}+{\frac{a}{2}} \right ) \right ) }+{\frac{d}{{b}^{2}}\ln \left ( \tan \left ({\frac{bx}{2}}+{\frac{a}{2}} \right ) -1 \right ) }+{\frac{d}{{b}^{2}}\ln \left ( \tan \left ({\frac{bx}{2}}+{\frac{a}{2}} \right ) +1 \right ) }-2\,{\frac{d\ln \left ( 1+ \left ( \tan \left ( 1/2\,bx+a/2 \right ) \right ) ^{2} \right ) }{{b}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*csc(b*x+a)^2*sec(b*x+a)^2,x)

[Out]

(1/2/b*c-3/b*c*tan(1/2*b*x+1/2*a)^2+1/2/b*c*tan(1/2*b*x+1/2*a)^4+1/2*d*x/b-3*d/b*x*tan(1/2*b*x+1/2*a)^2+1/2*d/
b*x*tan(1/2*b*x+1/2*a)^4)/tan(1/2*b*x+1/2*a)/(tan(1/2*b*x+1/2*a)^2-1)+d/b^2*ln(tan(1/2*b*x+1/2*a))+d/b^2*ln(ta
n(1/2*b*x+1/2*a)-1)+d/b^2*ln(tan(1/2*b*x+1/2*a)+1)-2*d/b^2*ln(1+tan(1/2*b*x+1/2*a)^2)

________________________________________________________________________________________

Maxima [B]  time = 1.50139, size = 416, normalized size = 11.89 \begin{align*} -\frac{2 \, c{\left (\frac{1}{\tan \left (b x + a\right )} - \tan \left (b x + a\right )\right )} - \frac{2 \, a d{\left (\frac{1}{\tan \left (b x + a\right )} - \tan \left (b x + a\right )\right )}}{b} - \frac{{\left ({\left (\cos \left (4 \, b x + 4 \, a\right )^{2} + \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \cos \left (4 \, b x + 4 \, a\right ) + 1\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) +{\left (\cos \left (4 \, b x + 4 \, a\right )^{2} + \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \cos \left (4 \, b x + 4 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) +{\left (\cos \left (4 \, b x + 4 \, a\right )^{2} + \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \cos \left (4 \, b x + 4 \, a\right ) + 1\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) - 8 \,{\left (b x + a\right )} \sin \left (4 \, b x + 4 \, a\right )\right )} d}{{\left (\cos \left (4 \, b x + 4 \, a\right )^{2} + \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \cos \left (4 \, b x + 4 \, a\right ) + 1\right )} b}}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*csc(b*x+a)^2*sec(b*x+a)^2,x, algorithm="maxima")

[Out]

-1/2*(2*c*(1/tan(b*x + a) - tan(b*x + a)) - 2*a*d*(1/tan(b*x + a) - tan(b*x + a))/b - ((cos(4*b*x + 4*a)^2 + s
in(4*b*x + 4*a)^2 - 2*cos(4*b*x + 4*a) + 1)*log(cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) +
 1) + (cos(4*b*x + 4*a)^2 + sin(4*b*x + 4*a)^2 - 2*cos(4*b*x + 4*a) + 1)*log(cos(b*x + a)^2 + sin(b*x + a)^2 +
 2*cos(b*x + a) + 1) + (cos(4*b*x + 4*a)^2 + sin(4*b*x + 4*a)^2 - 2*cos(4*b*x + 4*a) + 1)*log(cos(b*x + a)^2 +
 sin(b*x + a)^2 - 2*cos(b*x + a) + 1) - 8*(b*x + a)*sin(4*b*x + 4*a))*d/((cos(4*b*x + 4*a)^2 + sin(4*b*x + 4*a
)^2 - 2*cos(4*b*x + 4*a) + 1)*b))/b

________________________________________________________________________________________

Fricas [B]  time = 0.49963, size = 197, normalized size = 5.63 \begin{align*} \frac{d \cos \left (b x + a\right ) \log \left (-\frac{1}{2} \, \cos \left (b x + a\right ) \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + b d x - 2 \,{\left (b d x + b c\right )} \cos \left (b x + a\right )^{2} + b c}{b^{2} \cos \left (b x + a\right ) \sin \left (b x + a\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*csc(b*x+a)^2*sec(b*x+a)^2,x, algorithm="fricas")

[Out]

(d*cos(b*x + a)*log(-1/2*cos(b*x + a)*sin(b*x + a))*sin(b*x + a) + b*d*x - 2*(b*d*x + b*c)*cos(b*x + a)^2 + b*
c)/(b^2*cos(b*x + a)*sin(b*x + a))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*csc(b*x+a)**2*sec(b*x+a)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*csc(b*x+a)^2*sec(b*x+a)^2,x, algorithm="giac")

[Out]

Timed out